package com.dd.common.struct;

import com.dd.pojo.bo.FileBO;
import com.dd.pojo.entry.Folder;
import com.dd.pojo.entry.UserFoldFile;
import com.dd.pojo.entry.UserShare;
import com.dd.pojo.vo.ShareFileVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public interface FileVoCover {


    @Mappings({
            @Mapping(target = "shareDate",source = "loseData"),
            @Mapping(target = "shareFileId",source = "shareId"),
            @Mapping(target = "shareFileType",source = "shareFileType"),
            @Mapping(target = "sharePassword",source = "sharePassword")
    })
    UserShare  entity2UserShareFile(ShareFileVo shareFileVo);

    @Mappings({
            @Mapping(target = "fileName",source = "fileName"),
            @Mapping(target = "filePath",source = "filePath"),
    })
   FileBO entity2FiletoBo(UserFoldFile files);

    @Mappings({
            @Mapping(target = "foldName",source = "folderName"),
            @Mapping(target = "foldId",source = "folderId"),
    })
    FileBO entity2FoldtoBo(Folder files);

}
